﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace PROJECT_BOMBER.BLL
{
    class PlayMenu : GameState
    {
        public override void Initialize()
        {
            PlayMenuText = "Menu en jeu\n" +
                "Appuyez sur R pour reprendre le jeu\n" +
                "Appuyez sur M pour retourner au menu principal";
            PlayMenuTextPosition = new Vector2(0, 0);
        }

        public override void Update(float deltatime)
        {
            KeyboardState ks = Keyboard.GetState();
            if (ks.IsKeyDown(Keys.R))
            {
                Globals.GameStateStack.Pop();
            }
            else if (ks.IsKeyDown(Keys.M))
            {
                Globals.GameStateStack.Set(new MainMenuState());
            }
        }

        public override void Draw()
        {
            Globals.GDM.GraphicsDevice.Clear(Color.Blue);

            Globals.SpriteBatch.Begin();

            Globals.SpriteBatch.DrawString(Globals.ArialFont, PlayMenuText, PlayMenuTextPosition, Color.Black);

            Globals.SpriteBatch.End();
        }

        private String PlayMenuText = null;
        private Vector2 PlayMenuTextPosition = Vector2.Zero;


        public override void Load()
        {
            throw new NotImplementedException();
        }

        public override void Unload()
        {
            throw new NotImplementedException();
        }
    }
}
